package com.example.myapp.socket;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;

import com.example.myapp.chat;
import com.example.myapp.ui.home.Act_wholeshow;

import java.util.HashMap;
import java.util.Map;

public class ActListener implements View.OnClickListener{

    Context main;

    private String name = "";
    private String title = "";
    private String text = "";
    private String date = "";

    private Map<String,String> u_mis;


    public ActListener(Context main){
        this.main = main;
        u_mis = new HashMap<>();
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public void setText(String text) {
        this.text = text;
    }

    public void setDate(String date) {
        this.date = date;
    }

    @Override
    public void onClick(View v) {
        Intent i = new Intent(main, Act_wholeshow.class);
        i.putExtra("name",name);
        i.putExtra("title",title);
        i.putExtra("text",text);
        i.putExtra("date",date);
        main.startActivity(i);
    }
}
